package models;

import javax.persistence.Entity;
import javax.persistence.Table;

import org.hibernate.annotations.Formula;



@SuppressWarnings("serial")
@Entity
@Table(name="sys_icd")
public class Icd extends IdEntity{
	
	
	@Formula("(select COUNT(*) from sys_icdfl d where d.SJID = 0 or d.SJID is NULL)")
    private int isRoot;
	
	@Formula("(select COUNT(*) from sys_icdfl d where d.SJID = id)")
    private int subflCount;
	
	
	
	private String bm;
	private String mc;
	private String zjm;
	private String lb;
	private Integer flid;
	public String getBm() {
		return bm;
	}
	public void setBm(String bm) {
		this.bm = bm;
	}
	
	public Integer getFlid() {
		return flid;
	}
	public void setFlid(Integer flid) {
		this.flid = flid;
	}
	public String getLb() {
		return lb;
	}
	public void setLb(String lb) {
		this.lb = lb;
	}
	public String getMc() {
		return mc;
	}
	public void setMc(String mc) {
		this.mc = mc;
	}
	public String getZjm() {
		return zjm;
	}
	public void setZjm(String zjm) {
		this.zjm = zjm;
	}
	public int getIsRoot() {
		return isRoot;
	}
	public void setIsRoot(int isRoot) {
		this.isRoot = isRoot;
	}
	public int getSubflCount() {
		return subflCount;
	}
	public void setSubflCount(int subflCount) {
		this.subflCount = subflCount;
	}
}
